package labox.innovation.gameserver.taskmanager.tasks;

import labox.innovation.gameserver.taskmanager.Task;
import labox.innovation.gameserver.taskmanager.TaskManager.ExecutedTask;

/**
 * 垃圾回收任务
 * 
 */
public final class TaskCleanUp extends Task {
	public static final String NAME = "clean_up";

	/**
	 * 
	 * @see labox.innovation.gameserver.taskmanager.Task#getName()
	 */
	@Override
	public String getName() {
		return NAME;
	}

	/**
	 * 
	 * @see labox.innovation.gameserver.taskmanager.Task#onTimeElapsed(labox.innovation.gameserver.taskmanager.TaskManager.ExecutedTask)
	 */
	@Override
	public void onTimeElapsed(ExecutedTask task) {
		System.runFinalization();
		System.gc();
	}
}
